"use strict";

function _classCallCheck(t, e) {
    if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}
var _createClass = function () {
    function t(t, e) {
        for (var a = 0; a < e.length; a++) {
            var i = e[a];
            i.enumerable = i.enumerable || !1,
            i.configurable = !0,
            "value" in i && (i.writable = !0),
            Object.defineProperty(t, i.key, i)
        }
    }
    return function (e, a, i) {
        return a && t(e.prototype, a),
        i && t(e, i),
        e
    }
}();
!
function (t) {
    t.fn.slide = function (e) {
        return t.fn.slide.defaults = {
            type: "slide",
            effect: "fade",
            autoPlay: !1,
            delayTime: 500,
            interTime: 2500,
            triggerTime: 150,
            defaultIndex: 0,
            titCell: ".hd li",
            mainCell: ".bd",
            targetCell: null,
            trigger: "mouseover",
            scroll: 1,
            vis: 1,
            titOnClassName: "on",
            autoPage: !1,
            prevCell: ".prev",
            nextCell: ".next",
            pageStateCell: ".pageState",
            opp: !1,
            pnLoop: !0,
            easing: "swing",
            startFun: null,
            endFun: null,
            switchLoad: null,
            playStateCell: ".playState",
            mouseOverStop: !0,
            defaultPlay: !0,
            returnDefault: !1
        },
        this.each(function () {
            var a = t.extend({}, t.fn.slide.defaults, e),
                i = t(this),
                o = a.effect,
                n = t(a.prevCell, i),
                s = t(a.nextCell, i),
                r = t(a.pageStateCell, i),
                l = t(a.playStateCell, i),
                c = t(a.titCell, i),
                d = c.size(),
                u = t(a.mainCell, i),
                p = u.children().size(),
                h = a.switchLoad,
                m = t(a.targetCell, i),
                v = parseInt(a.defaultIndex),
                f = parseInt(a.delayTime),
                g = parseInt(a.interTime);
            parseInt(a.triggerTime);
            var y, _ = parseInt(a.scroll),
                w = parseInt(a.vis),
                b = "false" != a.autoPlay && 0 != a.autoPlay,
                C = "false" != a.opp && 0 != a.opp,
                k = "false" != a.autoPage && 0 != a.autoPage,
                x = "false" != a.pnLoop && 0 != a.pnLoop,
                T = "false" != a.mouseOverStop && 0 != a.mouseOverStop,
                I = "false" != a.defaultPlay && 0 != a.defaultPlay,
                j = "false" != a.returnDefault && 0 != a.returnDefault,
                S = 0,
                E = 0,
                P = 0,
                A = 0,
                O = a.easing,
                M = null,
                z = null,
                q = null,
                B = a.titOnClassName,
                L = c.index(i.find("." + B)),
                R = v = -1 == L ? v : L,
                D = v,
                Q = v,
                U = p >= w ? 0 != p % _ ? p % _ : _ : 0,
                F = "leftMarquee" == o || "topMarquee" == o,
                H = function () {
                    t.isFunction(a.startFun) && a.startFun(v, d, i, t(a.titCell, i), u, m, n, s)
                },
                W = function () {
                    t.isFunction(a.endFun) && a.endFun(v, d, i, t(a.titCell, i), u, m, n, s)
                },
                N = function () {
                    c.removeClass(B),
                    I && c.eq(D).addClass(B)
                };
            if ("menu" == a.type) return I && c.removeClass(B).eq(v).addClass(B),
            c.hover(function () {
                    y = t(this).find(a.targetCell);
                    var e = c.index(t(this));
                    z = setTimeout(function () {
                        switch (v = e, c.removeClass(B).eq(v).addClass(B), H(), o) {
                        case "fade":
                            y.stop(!0, !0).animate({
                                opacity: "show"
                            }, f, O, W);
                            break;
                        case "slideDown":
                            y.stop(!0, !0).animate({
                                height: "show"
                            }, f, O, W)
                        }
                    }, a.triggerTime)
                }, function () {
                    switch (clearTimeout(z), o) {
                    case "fade":
                        y.animate({
                            opacity: "hide"
                        }, f, O);
                        break;
                    case "slideDown":
                        y.animate({
                            height: "hide"
                        }, f, O)
                    }
                }),
            void(j && i.hover(function () {
                    clearTimeout(q)
                }, function () {
                    q = setTimeout(N, f)
                }));
            if (0 == d && (d = p), F && (d = 2), k) {
                    if (p >= w) if ("leftLoop" == o || "topLoop" == o) d = 0 != p % _ ? (0 ^ p / _) + 1 : p / _;
                    else {
                        var $ = p - w;
                        d = 1 + parseInt(0 != $ % _ ? $ / _ + 1 : $ / _),
                        0 >= d && (d = 1)
                    } else d = 1;
                    c.html("");
                    var Z = "";
                    if (1 == a.autoPage || "true" == a.autoPage) for (var Y = 0; d > Y; Y++) Z += "<li>" + (Y + 1) + "</li>";
                    else for (var Y = 0; d > Y; Y++) Z += a.autoPage.replace("$", Y + 1);
                    c.html(Z);
                    var c = c.children()
                }
            if (p >= w) {
                    u.children().each(function () {
                        t(this).width() > P && (P = t(this).width(), E = t(this).outerWidth(!0)),
                        t(this).height() > A && (A = t(this).height(), S = t(this).outerHeight(!0))
                    });
                    var G = u.children(),
                        X = function () {
                            for (var t = 0; w > t; t++) G.eq(t).clone().addClass("clone").appendTo(u);
                            for (var t = 0; U > t; t++) G.eq(p - t - 1).clone().addClass("clone").prependTo(u)
                        };
                    switch (o) {
                        case "fold":
                            u.css({
                                position: "relative",
                                width: E,
                                height: S
                            }).children().css({
                                position: "absolute",
                                width: P,
                                left: 0,
                                top: 0,
                                display: "none"
                            });
                            break;
                        case "top":
                            u.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:' + w * S + 'px"></div>').css({
                                top: -(v * _) * S,
                                position: "relative",
                                padding: "0",
                                margin: "0"
                            }).children().css({
                                height: A
                            });
                            break;
                        case "left":
                            u.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:' + w * E + 'px"></div>').css({
                                width: p * E,
                                left: -(v * _) * E,
                                position: "relative",
                                overflow: "hidden",
                                padding: "0",
                                margin: "0"
                            }).children().css({
                                float: "left",
                                width: P
                            });
                            break;
                        case "leftLoop":
                        case "leftMarquee":
                            X(),
                            u.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:' + w * E + 'px"></div>').css({
                                width: (p + w + U) * E,
                                position: "relative",
                                overflow: "hidden",
                                padding: "0",
                                margin: "0",
                                left: -(U + v * _) * E
                            }).children().css({
                                float: "left",
                                width: P
                            });
                            break;
                        case "topLoop":
                        case "topMarquee":
                            X(),
                            u.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:' + w * S + 'px"></div>').css({
                                height: (p + w + U) * S,
                                position: "relative",
                                padding: "0",
                                margin: "0",
                                top: -(U + v * _) * S
                            }).children().css({
                                height: A
                            })
                        }
                }
            var V = function (t) {
                    var e = t * _;
                    return t == d ? e = p : -1 == t && 0 != p % _ && (e = -p % _),
                    e
                },
                K = function (e) {
                    var a = function (a) {
                        for (var i = a; w + a > i; i++) e.eq(i).find("img[" + h + "]").each(function () {
                            var e = t(this);
                            if (e.attr("src", e.attr(h)).removeAttr(h), u.find(".clone")[0]) for (var a = u.children(), i = 0; i < a.size(); i++) a.eq(i).find("img[" + h + "]").each(function () {
                                t(this).attr(h) == e.attr("src") && t(this).attr("src", t(this).attr(h)).removeAttr(h)
                            })
                        })
                    };
                    switch (o) {
                    case "fade":
                    case "fold":
                    case "top":
                    case "left":
                    case "slideDown":
                        a(v * _);
                        break;
                    case "leftLoop":
                    case "topLoop":
                        a(U + V(Q));
                        break;
                    case "leftMarquee":
                    case "topMarquee":
                        var i = "leftMarquee" == o ? u.css("left").replace("px", "") : u.css("top").replace("px", ""),
                            n = "leftMarquee" == o ? E : S,
                            s = U;
                        if (0 != i % n) {
                                var r = Math.abs(0 ^ i / n);
                                s = 1 == v ? U + r : U + r - 1
                            }
                        a(s)
                    }
                },
                J = function (t) {
                    if (!I || R != v || t || F) {
                        if (F ? v >= 1 ? v = 1 : 0 >= v && (v = 0) : (Q = v, v >= d ? v = 0 : 0 > v && (v = d - 1)), H(), null != h && K(u.children()), m[0] && (y = m.eq(v), null != h && K(m), "slideDown" == o ? (m.not(y).stop(!0, !0).slideUp(f), y.slideDown(f, O, function () {
                            u[0] || W()
                        })) : (m.not(y).stop(!0, !0).hide(), y.animate({
                            opacity: "show"
                        }, f, function () {
                            u[0] || W()
                        }))), p >= w) switch (o) {
                        case "fade":
                            u.children().stop(!0, !0).eq(v).animate({
                                opacity: "show"
                            }, f, O, function () {
                                W()
                            }).siblings().hide();
                            break;
                        case "fold":
                            u.children().stop(!0, !0).eq(v).animate({
                                opacity: "show"
                            }, f, O, function () {
                                W()
                            }).siblings().animate({
                                opacity: "hide"
                            }, f, O);
                            break;
                        case "top":
                            u.stop(!0, !1).animate({
                                top: -v * _ * S
                            }, f, O, function () {
                                W()
                            });
                            break;
                        case "left":
                            u.stop(!0, !1).animate({
                                left: -v * _ * E
                            }, f, O, function () {
                                W()
                            });
                            break;
                        case "leftLoop":
                            var e = Q;
                            u.stop(!0, !0).animate({
                                left: -(V(Q) + U) * E
                            }, f, O, function () {
                                -1 >= e ? u.css("left", -(U + (d - 1) * _) * E) : e >= d && u.css("left", -U * E),
                                W()
                            });
                            break;
                        case "topLoop":
                            var e = Q;
                            u.stop(!0, !0).animate({
                                top: -(V(Q) + U) * S
                            }, f, O, function () {
                                -1 >= e ? u.css("top", -(U + (d - 1) * _) * S) : e >= d && u.css("top", -U * S),
                                W()
                            });
                            break;
                        case "leftMarquee":
                            var a = u.css("left").replace("px", "");
                            0 == v ? u.animate({
                                left: ++a
                            }, 0, function () {
                                u.css("left").replace("px", "") >= 0 && u.css("left", -p * E)
                            }) : u.animate({
                                left: --a
                            }, 0, function () {
                                u.css("left").replace("px", "") <= -(p + U) * E && u.css("left", -U * E)
                            });
                            break;
                        case "topMarquee":
                            var i = u.css("top").replace("px", "");
                            0 == v ? u.animate({
                                top: ++i
                            }, 0, function () {
                                u.css("top").replace("px", "") >= 0 && u.css("top", -p * S)
                            }) : u.animate({
                                top: --i
                            }, 0, function () {
                                u.css("top").replace("px", "") <= -(p + U) * S && u.css("top", -U * S)
                            })
                        }
                        c.removeClass(B).eq(v).addClass(B),
                        R = v,
                        x || (s.removeClass("nextStop"), n.removeClass("prevStop"), 0 == v && n.addClass("prevStop"), v == d - 1 && s.addClass("nextStop")),
                        r.html("<span>" + (v + 1) + "</span>/" + d)
                    }
                };
            I && J(!0),
            j && i.hover(function () {
                    clearTimeout(q)
                }, function () {
                    q = setTimeout(function () {
                        v = D,
                        I ? J() : "slideDown" == o ? y.slideUp(f, N) : y.animate({
                            opacity: "hide"
                        }, f, N),
                        R = v
                    }, 300)
                });
            var tt = function (t) {
                    M = setInterval(function () {
                        C ? v-- : v++,
                        J()
                    }, t ? t : g)
                },
                et = function (t) {
                    M = setInterval(J, t ? t : g)
                },
                at = function () {
                    T || (clearInterval(M), tt())
                },
                it = function () {
                    (x || v != d - 1) && (v++, J(), F || at())
                },
                ot = function () {
                    (x || 0 != v) && (v--, J(), F || at())
                },
                nt = function () {
                    clearInterval(M),
                    F ? et() : tt(),
                    l.removeClass("pauseState")
                },
                st = function () {
                    clearInterval(M),
                    l.addClass("pauseState")
                };
            if (b ? F ? (C ? v-- : v++, et(), T && u.hover(st, nt)) : (tt(), T && i.hover(st, nt)) : (F && (C ? v-- : v++), l.addClass("pauseState")), l.click(function () {
                    l.hasClass("pauseState") ? nt() : st()
                }), "mouseover" == a.trigger ? c.hover(function () {
                    var t = c.index(this);
                    z = setTimeout(function () {
                        v = t,
                        J(),
                        at()
                    }, a.triggerTime)
                }, function () {
                    clearTimeout(z)
                }) : c.click(function () {
                    v = c.index(this),
                    J(),
                    at()
                }), F) {
                    if (s.mousedown(it), n.mousedown(ot), x) {
                        var rt, lt = function () {
                            rt = setTimeout(function () {
                                clearInterval(M),
                                et(0 ^ g / 10)
                            }, 150)
                        },
                            ct = function () {
                                clearTimeout(rt),
                                clearInterval(M),
                                et()
                            };
                        s.mousedown(lt),
                        s.mouseup(ct),
                        n.mousedown(lt),
                        n.mouseup(ct)
                    }
                    "mouseover" == a.trigger && (s.hover(it, function () {}), n.hover(ot, function () {}))
                } else s.click(it),
            n.click(ot)
        })
    }
}(jQuery),
jQuery.easing.jswing = jQuery.easing.swing,
jQuery.extend(jQuery.easing, {
    def: "easeOutQuad",
    swing: function (t, e, a, i, o) {
        return jQuery.easing[jQuery.easing.def](t, e, a, i, o)
    },
    easeInQuad: function (t, e, a, i, o) {
        return i * (e /= o) * e + a
    },
    easeOutQuad: function (t, e, a, i, o) {
        return -i * (e /= o) * (e - 2) + a
    },
    easeInOutQuad: function (t, e, a, i, o) {
        return (e /= o / 2) < 1 ? i / 2 * e * e + a : -i / 2 * (--e * (e - 2) - 1) + a
    },
    easeInCubic: function (t, e, a, i, o) {
        return i * (e /= o) * e * e + a
    },
    easeOutCubic: function (t, e, a, i, o) {
        return i * ((e = e / o - 1) * e * e + 1) + a
    },
    easeInOutCubic: function (t, e, a, i, o) {
        return (e /= o / 2) < 1 ? i / 2 * e * e * e + a : i / 2 * ((e -= 2) * e * e + 2) + a
    },
    easeInQuart: function (t, e, a, i, o) {
        return i * (e /= o) * e * e * e + a
    },
    easeOutQuart: function (t, e, a, i, o) {
        return -i * ((e = e / o - 1) * e * e * e - 1) + a
    },
    easeInOutQuart: function (t, e, a, i, o) {
        return (e /= o / 2) < 1 ? i / 2 * e * e * e * e + a : -i / 2 * ((e -= 2) * e * e * e - 2) + a
    },
    easeInQuint: function (t, e, a, i, o) {
        return i * (e /= o) * e * e * e * e + a
    },
    easeOutQuint: function (t, e, a, i, o) {
        return i * ((e = e / o - 1) * e * e * e * e + 1) + a
    },
    easeInOutQuint: function (t, e, a, i, o) {
        return (e /= o / 2) < 1 ? i / 2 * e * e * e * e * e + a : i / 2 * ((e -= 2) * e * e * e * e + 2) + a
    },
    easeInSine: function (t, e, a, i, o) {
        return -i * Math.cos(e / o * (Math.PI / 2)) + i + a
    },
    easeOutSine: function (t, e, a, i, o) {
        return i * Math.sin(e / o * (Math.PI / 2)) + a
    },
    easeInOutSine: function (t, e, a, i, o) {
        return -i / 2 * (Math.cos(Math.PI * e / o) - 1) + a
    },
    easeInExpo: function (t, e, a, i, o) {
        return 0 == e ? a : i * Math.pow(2, 10 * (e / o - 1)) + a
    },
    easeOutExpo: function (t, e, a, i, o) {
        return e == o ? a + i : i * (-Math.pow(2, -10 * e / o) + 1) + a
    },
    easeInOutExpo: function (t, e, a, i, o) {
        return 0 == e ? a : e == o ? a + i : (e /= o / 2) < 1 ? i / 2 * Math.pow(2, 10 * (e - 1)) + a : i / 2 * (-Math.pow(2, -10 * --e) + 2) + a
    },
    easeInCirc: function (t, e, a, i, o) {
        return -i * (Math.sqrt(1 - (e /= o) * e) - 1) + a
    },
    easeOutCirc: function (t, e, a, i, o) {
        return i * Math.sqrt(1 - (e = e / o - 1) * e) + a
    },
    easeInOutCirc: function (t, e, a, i, o) {
        return (e /= o / 2) < 1 ? -i / 2 * (Math.sqrt(1 - e * e) - 1) + a : i / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + a
    },
    easeInElastic: function (t, e, a, i, o) {
        var n = 1.70158,
            s = 0,
            r = i;
        if (0 == e) return a;
        if (1 == (e /= o)) return a + i;
        if (s || (s = .3 * o), r < Math.abs(i)) {
                r = i;
                var n = s / 4
            } else var n = s / (2 * Math.PI) * Math.asin(i / r);
        return -(r * Math.pow(2, 10 * (e -= 1)) * Math.sin(2 * (e * o - n) * Math.PI / s)) + a
    },
    easeOutElastic: function (t, e, a, i, o) {
        var n = 1.70158,
            s = 0,
            r = i;
        if (0 == e) return a;
        if (1 == (e /= o)) return a + i;
        if (s || (s = .3 * o), r < Math.abs(i)) {
                r = i;
                var n = s / 4
            } else var n = s / (2 * Math.PI) * Math.asin(i / r);
        return r * Math.pow(2, -10 * e) * Math.sin(2 * (e * o - n) * Math.PI / s) + i + a
    },
    easeInOutElastic: function (t, e, a, i, o) {
        var n = 1.70158,
            s = 0,
            r = i;
        if (0 == e) return a;
        if (2 == (e /= o / 2)) return a + i;
        if (s || (s = .3 * o * 1.5), r < Math.abs(i)) {
                r = i;
                var n = s / 4
            } else var n = s / (2 * Math.PI) * Math.asin(i / r);
        return 1 > e ? -.5 * r * Math.pow(2, 10 * (e -= 1)) * Math.sin(2 * (e * o - n) * Math.PI / s) + a : .5 * r * Math.pow(2, -10 * (e -= 1)) * Math.sin(2 * (e * o - n) * Math.PI / s) + i + a
    },
    easeInBack: function (t, e, a, i, o, n) {
        return void 0 == n && (n = 1.70158),
        i * (e /= o) * e * ((n + 1) * e - n) + a
    },
    easeOutBack: function (t, e, a, i, o, n) {
        return void 0 == n && (n = 1.70158),
        i * ((e = e / o - 1) * e * ((n + 1) * e + n) + 1) + a
    },
    easeInOutBack: function (t, e, a, i, o, n) {
        return void 0 == n && (n = 1.70158),
        (e /= o / 2) < 1 ? i / 2 * e * e * (((n *= 1.525) + 1) * e - n) + a : i / 2 * ((e -= 2) * e * (((n *= 1.525) + 1) * e + n) + 2) + a
    },
    easeInBounce: function (t, e, a, i, o) {
        return i - jQuery.easing.easeOutBounce(t, o - e, 0, i, o) + a
    },
    easeOutBounce: function (t, e, a, i, o) {
        return (e /= o) < 1 / 2.75 ? 7.5625 * i * e * e + a : 2 / 2.75 > e ? i * (7.5625 * (e -= 1.5 / 2.75) * e + .75) + a : 2.5 / 2.75 > e ? i * (7.5625 * (e -= 2.25 / 2.75) * e + .9375) + a : i * (7.5625 * (e -= 2.625 / 2.75) * e + .984375) + a
    },
    easeInOutBounce: function (t, e, a, i, o) {
        return o / 2 > e ? .5 * jQuery.easing.easeInBounce(t, 2 * e, 0, i, o) + a : .5 * jQuery.easing.easeOutBounce(t, 2 * e - o, 0, i, o) + .5 * i + a
    }
}),
+
function (t) {
    function e() {
        var t = document.createElement("bootstrap"),
            e = {
                WebkitTransition: "webkitTransitionEnd",
                MozTransition: "transitionend",
                OTransition: "oTransitionEnd otransitionend",
                transition: "transitionend"
            };
        for (var a in e) if (void 0 !== t.style[a]) return {
                end: e[a]
            };
        return !1
    }
    t.fn.emulateTransitionEnd = function (e) {
        var a = !1,
            i = this;
        t(this).one("bsTransitionEnd", function () {
                a = !0
            });
        var o = function () {
                a || t(i).trigger(t.support.transition.end)
            };
        return setTimeout(o, e),
        this
    },
    t(function () {
        t.support.transition = e(),
        t.support.transition && (t.event.special.bsTransitionEnd = {
            bindType: t.support.transition.end,
            delegateType: t.support.transition.end,
            handle: function (e) {
                if (t(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
            }
        })
    })
}(jQuery),
+
function (t) {
    function e() {
        this._activeZoom = this._initialScrollPosition = this._initialTouchPosition = this._touchMoveListener = null,
        this._$document = t(document),
        this._$window = t(window),
        this._$body = t(document.body),
        this._boundClick = t.proxy(this._clickHandler, this)
    }
    function a(e) {
        this._fullHeight = this._fullWidth = this._overlay = this._targetImageWrap = null,
        this._targetImage = e,
        this._$body = t(document.body)
    }
    e.prototype.listen = function () {
        this._$body.on("click", '[data-action="zoom"]', t.proxy(this._zoom, this))
    },
    e.prototype._zoom = function (e) {
        var i = e.target;
        if (i && "IMG" == i.tagName && !this._$body.hasClass("zoom-overlay-open")) return e.metaKey || e.ctrlKey ? window.open(e.target.getAttribute("data-original") || e.target.src, "_blank") : void(i.width >= t(window).width() - a.OFFSET || (this._activeZoomClose(!0), this._activeZoom = new a(i), this._activeZoom.zoomImage(), this._$window.on("scroll.zoom", t.proxy(this._scrollHandler, this)), this._$document.on("keyup.zoom", t.proxy(this._keyHandler, this)), this._$document.on("touchstart.zoom", t.proxy(this._touchStart, this)), document.addEventListener ? document.addEventListener("click", this._boundClick, !0) : document.attachEvent("onclick", this._boundClick, !0), "bubbles" in e ? e.bubbles && e.stopPropagation() : e.cancelBubble = !0))
    },
    e.prototype._activeZoomClose = function (t) {
        this._activeZoom && (t ? this._activeZoom.dispose() : this._activeZoom.close(), this._$window.off(".zoom"), this._$document.off(".zoom"), document.removeEventListener("click", this._boundClick, !0), this._activeZoom = null)
    },
    e.prototype._scrollHandler = function (e) {
        null === this._initialScrollPosition && (this._initialScrollPosition = t(window).scrollTop());
        var a = this._initialScrollPosition - t(window).scrollTop();
        Math.abs(a) >= 40 && this._activeZoomClose()
    },
    e.prototype._keyHandler = function (t) {
        27 == t.keyCode && this._activeZoomClose()
    },
    e.prototype._clickHandler = function (t) {
        t.preventDefault ? t.preventDefault() : event.returnValue = !1,
        "bubbles" in t ? t.bubbles && t.stopPropagation() : t.cancelBubble = !0,
        this._activeZoomClose()
    },
    e.prototype._touchStart = function (e) {
        this._initialTouchPosition = e.touches[0].pageY,
        t(e.target).on("touchmove.zoom", t.proxy(this._touchMove, this))
    },
    e.prototype._touchMove = function (e) {
        Math.abs(e.touches[0].pageY - this._initialTouchPosition) > 10 && (this._activeZoomClose(), t(e.target).off("touchmove.zoom"))
    },
    a.OFFSET = 80,
    a._MAX_WIDTH = 2560,
    a._MAX_HEIGHT = 4096,
    a.prototype.zoomImage = function () {
        var e = document.createElement("img");
        e.onload = t.proxy(function () {
            this._fullHeight = Number(e.height),
            this._fullWidth = Number(e.width),
            this._zoomOriginal()
        }, this),
        e.src = this._targetImage.src
    },
    a.prototype._zoomOriginal = function () {
        this._targetImageWrap = document.createElement("div"),
        this._targetImageWrap.className = "zoom-img-wrap",
        this._targetImage.parentNode.insertBefore(this._targetImageWrap, this._targetImage),
        this._targetImageWrap.appendChild(this._targetImage),
        t(this._targetImage).addClass("zoom-img").attr("data-action", "zoom-out"),
        this._overlay = document.createElement("div"),
        this._overlay.className = "zoom-overlay",
        document.body.appendChild(this._overlay),
        this._calculateZoom(),
        this._triggerAnimation()
    },
    a.prototype._calculateZoom = function () {
        this._targetImage.offsetWidth;
        var e = this._fullWidth,
            i = this._fullHeight,
            o = (t(window).scrollTop(), e / this._targetImage.width),
            n = t(window).height() - a.OFFSET,
            s = t(window).width() - a.OFFSET,
            r = e / i,
            l = s / n;
        e < s && i < n ? this._imgScaleFactor = o : r < l ? this._imgScaleFactor = n / i * o : this._imgScaleFactor = s / e * o
    },
    a.prototype._triggerAnimation = function () {
        this._targetImage.offsetWidth;
        var e = t(this._targetImage).offset(),
            a = t(window).scrollTop(),
            i = a + t(window).height() / 2,
            o = t(window).width() / 2,
            n = e.top + this._targetImage.height / 2,
            s = e.left + this._targetImage.width / 2;
        this._translateY = i - n,
        this._translateX = o - s;
        var r = "scale(" + this._imgScaleFactor + ")",
            l = "translate(" + this._translateX + "px, " + this._translateY + "px)";
        t.support.transition && (l += " translateZ(0)"),
        t(this._targetImage).css({
                "-webkit-transform": r,
                "-ms-transform": r,
                transform: r
            }),
        t(this._targetImageWrap).css({
                "-webkit-transform": l,
                "-ms-transform": l,
                transform: l
            }),
        this._$body.addClass("zoom-overlay-open")
    },
    a.prototype.close = function () {
        return this._$body.removeClass("zoom-overlay-open").addClass("zoom-overlay-transitioning"),
        t(this._targetImage).css({
            "-webkit-transform": "",
            "-ms-transform": "",
            transform: ""
        }),
        t(this._targetImageWrap).css({
            "-webkit-transform": "",
            "-ms-transform": "",
            transform: ""
        }),
        t.support.transition ? void t(this._targetImage).one(t.support.transition.end, t.proxy(this.dispose, this)).emulateTransitionEnd(300) : this.dispose()
    },
    a.prototype.dispose = function () {
        this._targetImageWrap && this._targetImageWrap.parentNode && (t(this._targetImage).removeClass("zoom-img").attr("data-action", "zoom"), this._targetImageWrap.parentNode.replaceChild(this._targetImage, this._targetImageWrap), this._overlay.parentNode.removeChild(this._overlay), this._$body.removeClass("zoom-overlay-transitioning"))
    },
    t(function () {
        (new e).listen()
    })
}(jQuery),


function (t) {
    function e() {
        var t = '<div class="overlay"><button class="overlayclose-btn" data-action="overlay-close">×</button><iframe id="top_login_frame" src="https://passport.woshipm.com/user/2popLogin.html?FS=YYP&ISPOP=1&REDIRECT=' + window.location.href + '" width=600 height=400 scrolling="no" class="top_fc_box"></iframe></div>';
        o.append(t)
    }
    function a(t) {
        var e = '<div class="y-post--card y-backgroundWhite" data-id="' + t.id + '"><a class="y-post-image y-backgroundCover y-block" href="saasContent.action?contentId=' + t.id + '" target="_blank" style="background-image: url(' + t.image + ');"></a><div class="y-post-category">' + t.category + '</div><div class="y-padding15 y-flexColumn y-height100"><h3 class="y-flex1 y-maxHeight2LineHeightTighter"><a href="' + t.permalink + '" target="_blank">' + t.title + '</a></h3><div class="y-flex0 y-textSmall y-colorLighGray"><time>' + t.modify + "</time></div></div></div>";
        return e
    }
    function i(t) {
        var e = t.match(/[^\x00-\xff]/gi);
        return t.length + (null == e ? 0 : e.length)
    }
    var o = t("body"),
        n = function () {
            var e = t(".butterBar");
            e.length && e.remove()
        };
    window.clearButterbar = n;
    var s = function (t, e) {
            n();
            var a = e ? " butterBar--error" : "";
            o.append('<div class="butterBar butterBar--center' + a + '"><p class="butterBar-message">' + t + "</p></div>"),
            setTimeout("clearButterbar()", 3e3)
        };
    window.createButterbar = s;
    var r = t("#cancel-comment-reply-link");
    r.text();
    t(document).on("submit", ".comment-form", function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("post"),
                n = t(".respond-" + i),
                r = parseInt(t("#comments-" + i + " .comments-title span").html());
            return a.hasClass("is-active") ? s("别提交太快:-)", !0) : (o.addClass("is-loadingApp"), a.addClass("is-active"), void t.ajax({
                    url: PURE.restapi + "v1/post/" + i + "/comment",
                    data: a.serialize() + "&_wpnonce=" + PURE.nonce,
                    type: "POST",
                    dataType: "json",
                    success: function (e) {
                        if (500 == e.status) s(e.data, !0),
                        setTimeout(function () {
                            a.removeClass("is-active")
                        }, 3e3),
                        o.removeClass("is-loadingApp");
                        else {
                            var l = addComment,
                                c = l.I("cancel-comment-reply-link"),
                                d = l.I("wp-temp-form-div"),
                                u = l.I(l.respondId),
                                p = (l.I("comment_post_ID").value, l.I("comment_parent").value);
                            if ("0" != p) var h = '<li class="comment"><div class="comment-block"><div class="comment-info"><div class="comment-meta"><div class="comment-author">' + e.data.comment_author + '</div><div class="comment-time">' + e.data.comment_time + '</div></div></div><div class="comment-content">' + e.data.comment_text + "</div></div></li>";
                            else var h = '<li class="comment"><div class="comment-block"><div class="comment-info"><div class="comment-avatar">' + e.data.avatar + '</div><div class="comment-meta"><div class="comment-author">' + e.data.comment_author + '</div><div class="comment-time">' + e.data.comment_time + '</div></div></div><div class="comment-content">' + e.data.comment_text + "</div></div></li>";
                            t("textarea").each(function () {
                                    this.value = ""
                                }),
                            "0" != p ? n.parent().parent().hasClass("children") ? n.parent().after(h) : n.parent().find(".children").length ? n.parent().find(".children").append(h) : n.before('<ol class="children">' + h + "</ol>") : t(".comment-list-" + i).prepend(h),
                            s('<i class="iconfont icon-sun"></i>提交成功'),
                            t("#comments-" + i + " .comments-title span").html(r + 1),
                            setTimeout(function () {
                                    a.removeClass("is-active")
                                }, 9e3),
                            o.removeClass("is-loadingApp"),
                            c.style.display = "none",
                            c.onclick = null,
                            l.I("comment_parent").value = "0",
                            d && u && (d.parentNode.insertBefore(u, d), d.parentNode.removeChild(d))
                        }
                    }
                }))
        }),
    t(document).on("click", ".commentnav a", function () {
            var e = t(this).attr("href"),
                a = t(this).parent().data("fuck"),
                i = t("#comment-post-" + a),
                o = 1,
                n = t("#cancel-comment-reply-link");
            /comment-page-/i.test(e) ? o = e.split(/comment-page-/i)[1].split(/(\/|#|&).*jQuery/)[0] : /cpage=/i.test(e) && (o = e.split(/cpage=/)[1].split(/(\/|#|&).*jQuery/)[0]),
            n.click();
            var s = {
                    action: "ajax_comment_page_nav",
                    um_post: a,
                    um_page: o
                };
            return jQuery.post(PURE.ajax_url, s, function (e) {
                    i.html(e),
                    t("body, html").animate({
                        scrollTop: i.offset().top - 50
                    }, 1e3)
                }),
            !1
        }),
    t(document).on("click", '[data-action="popLogin"]', function (t) {
            return t.preventDefault(),
            e()
        });
    var l;
    t(".menu-item-has-children").hover(function () {
            var e = t(this),
                a = e.find(".sub-menu");
            return a.hasClass("is-active") ? clearTimeout(l) : (t(".sub-menu").removeClass("is-active"), a.addClass("is-active"), void(a && clearTimeout(l)))
        }, function () {
            var e = t(this),
                a = e.find(".sub-menu");
            l = setTimeout(function () {
                    a.removeClass("is-active")
                }, 500)
        }),
    t(".user-avatar").hover(function () {
            var e = t(this),
                a = e.find(".user-top-nav");
            return a.hasClass("is-active") ? clearTimeout(l) : (a.addClass("is-active"), void(a && clearTimeout(l)))
        }, function () {
            var e = t(this),
                a = e.find(".user-top-nav");
            l = setTimeout(function () {
                    a.removeClass("is-active")
                }, 500)
        }),
    t(document).on("blur", ".menu-item", function () {
            var e = t(this),
                a = e.find(".sub-menu");
            a.removeClass("is-active")
        }),
    t(window).on("scroll", function () {
            var e = t(this).scrollTop();
            if (PURE.is_single) {
                var a = t(".footer-rec-posts").offset().top;
                e + t(window).height() > a ? t(".y-qrcode--fixed").removeClass("is-active") : t(".y-qrcode--fixed").addClass("is-active")
            }
            e > 200 ? t(".back2top").addClass("is-active") : t(".back2top").removeClass("is-active")
        }),
    t(document).on("click", ".back2top", function () {
            t("html,body").animate({
                scrollTop: 0
            }, 800)
        }),
    t(document).on("click", ".loadmore", function (e) {
            e.preventDefault();
            var i = t(this),
                n = i.data("paged");
            i.data().pageNo = n;
            return i.hasClass("is-active") ? s("您点的也太快了", !0) : (i.addClass("is-active"), o.addClass("is-loadingApp"), void t.ajax({
                    url: PURE.restapi + "saas.action?loadMore",
                    type: "GET",
                    dataType: "json",
                    data: i.data(),
                    success: function (e) {
//                    	e = e.obj;
                        if (e.obj&&e.obj.length>0) {
                            var s = "";
                            t.each(e.obj, function (t, e) {
                                s += a(e)
                            }),
                            t(".y-post-list").append(s),
                            homeLazy.updateSelector(),
                            i.data("paged", n + 1),
                            i.removeClass("is-active")
                        } else {
                        	alert("没有更多数据");
                        	i.remove();
                        }
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", ".button--postlike", function (e) {
            e.preventDefault();
            var a = t(this).data("id"),
                i = t(this);
            return i.hasClass("is-active") ? s("您已经赞过了", !0) : (i.addClass("is-active"), o.addClass("is-loadingApp"), void t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: a,
                        action: "postlike"
                    },
                    success: function (t) {
                        i.find(".count").html(t.likes),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="move-to-archive"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "moveToArchive"
                    },
                    success: function (e) {
                        t("#post-" + i).remove(),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="move-to-queue"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "moveToQueue"
                    },
                    success: function (e) {
                        t("#post-" + i).remove(),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="remove-from-queue"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "removeFromQueue"
                    },
                    success: function (e) {
                        t("#post-" + i).remove(),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="remove-from-bookmarks"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "removeFromBookmarks"
                    },
                    success: function (t) {
                        a.attr("data-action", "add-to-bookmarks"),
                        a.find(".js-remove-from-bookmarks").addClass("u-hide"),
                        a.find(".js-add-to-bookmarks").removeClass("u-hide"),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="add-to-archive"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "addToArchive"
                    },
                    success: function (t) {
                        a.attr("data-action", "remove-from-bookmarks"),
                        a.find(".js-add-to-archive").addClass("u-hide"),
                        a.find(".js-remove-from-bookmarks").removeClass("u-hide"),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", '[data-action="add-to-bookmarks"]', function (e) {
            e.preventDefault();
            var a = t(this),
                i = a.data("id");
            a.hasClass("is-active") || (a.hasClass("is-active"), t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        id: i,
                        action: "addToBookmarks"
                    },
                    success: function (t) {
                        a.attr("data-action", "add-to-archive"),
                        a.find(".js-add-to-bookmarks").addClass("u-hide"),
                        a.find(".js-add-to-archive").removeClass("u-hide"),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                }))
        }),
    t(document).on("click", ".show-s .doshow", function (e) {
            e.preventDefault();
            var a = t(".my-smilies");
            a.hasClass("is-active") ? a.removeClass("is-active") : a.addClass("is-active")
        }),
    t(document).on("click", '[data-action="addSmily"]', function (e) {
            e.preventDefault();
            var a, i = jQuery(this).parent().data("id"),
                o = " " + jQuery(this).data("smilies") + " ";
            if (!document.getElementsByClassName("textarea-" + i)[0] || "textarea" != document.getElementsByClassName("textarea-" + i)[0].type) return !1;
            if (a = document.getElementsByClassName("textarea-" + i)[0], document.selection) a.focus(),
            sel = document.selection.createRange(),
            sel.text = o,
            a.focus();
            else if (a.selectionStart || "0" == a.selectionStart) {
                    var n = a.selectionStart,
                        s = a.selectionEnd,
                        r = s;
                    a.value = a.value.substring(0, n) + o + a.value.substring(s, a.value.length),
                    r += o.length,
                    a.focus(),
                    a.selectionStart = r,
                    a.selectionEnd = r
                } else a.value += o,
            a.focus();
            return t(".my-smilies").removeClass("is-active"),
            !1
        }),
    t(document).on("submit", "#user-info-update", function (e) {
            e.preventDefault();
            var a = t(this);
            if (i(a.find("textarea").val()) > 60) return s("个人资料过长", !0);
            if (i(a.find('input[name="nickname"]').val()) > 10) return s("昵称过长", !0);
            if (i(a.find('input[name="user_company"]').val()) > 15) return s("公司名过长", !0);
            if (!a.hasClass("is-active")) {
                a.addClass("is-active"),
                o.addClass("is-loadingApp");
                var n = a.serialize() + "&action=update_user_info";
                t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: n,
                    success: function (t) {
                        (t.code = 200) ? s("资料更新成功") : s(t.message, !0),
                        a.removeClass("is-active"),
                        o.removeClass("is-loadingApp")
                    }
                })
            }
        }),
    t(document).on("click", ".show-search", function (t) {
            o.hasClass("body-search") ? o.removeClass("body-search") : o.addClass("body-search")
        });
    var c = 10;
    t(document).on("click", ".add_qidianla_class", function (e) {
            e.preventDefault();
            var a = "qidianla_classes";
            t(".qidianla-classes-ul").append('<li class="qidianla-classes-item"><label for="' + a + "[" + c + '][name]"><span>课程标题</span><input class="admin-textInput"  id="' + a + "[" + c + '][name]" name="' + a + "[" + c + '][name]" value="" type="text" /></label><label for="' + a + "[" + c + '][link]"><span>课程链接</span><input class="admin-textInput" name="' + a + "[" + c + '][link]" value="" type="text" /></label><label for="' + a + "[" + c + '][image]"><span>课程图片</span><input class="admin-textInput" name="' + a + "[" + c + '][image]" value="" type="text" /></label></li>'),
            c++
        }),
    t(document).on("click", '[data-action="qidianla_classes-delete"]', function (e) {
            e.preventDefault();
            var a = t(this);
            a.parent().parent().remove()
        }),
    t(document).on("submit", ".qidianla-classes-form", function (e) {
            e.preventDefault(),
            t.ajax({
                url: PURE.ajax_url,
                type: "POST",
                data: t(this).serialize() + "&action=qidianla_classes",
                success: function (t) {
                    alert("保存成功")
                }
            })
        }),
    t(document).on("click", '[data-action="add-nav-item"]', function (e) {
            e.preventDefault();
            var a = '<li class="list-item list-item--compact"><div class="navItemEditor u-inlineBlock inputGroup"><input class="textInput textInput--narrow u-padding0 textInput--underlined list-itemInput list-itemInput--inline u-fontSize16 u-marginTop3 u-marginRight15 " placeholder="广告内容" name="ad[]" value="" type="text"></div><button class="button button--chromeless button--delete u-baseColor--buttonNormal button--withIcon button--withSvgIcon js-removeNavItem is-touched" data-action="remove-nav-item"><span class="svgIcon svgIcon--trashcan svgIcon--25px"><svg class="svgIcon-use" width="25" height="25" viewBox="0 0 25 25"><g fill-rule="evenodd"><path d="M10.5 5h4c.3 0 .5-.2.5-.5s-.2-.5-.5-.5h-4c-.3 0-.5.2-.5.5s.2.5.5.5zm4 12.8c.3 0 .5-.3.5-.5v-5.5c0-.3-.2-.5-.5-.5s-.5.2-.5.5v5.5c0 .3.2.5.5.5z"></path><path d="M19.2 7.5c0-.8-.6-1.5-1.4-1.5H7.2c-.8 0-1.4.7-1.4 1.5 0 .732.505 1.374 1.204 1.48 0 .006-.004.012-.004.02v11c0 .6.4 1 1 1h9c.6 0 1-.4 1-1V9c0-.012-.005-.02-.006-.032.67-.145 1.206-.768 1.206-1.468zM17 20H8V9h9v11zm.8-12H7.2c-.2 0-.4-.2-.4-.5S7 7 7.2 7h10.6c.3 0 .5.2.5.5s-.3.5-.5.5z"></path><path d="M12.5 17.8c.3 0 .5-.3.5-.5v-5.5c0-.3-.2-.5-.5-.5s-.5.2-.5.5v5.5c0 .3.2.5.5.5zm-2 0c.3 0 .5-.3.5-.5v-5.5c0-.3-.2-.5-.5-.5s-.5.2-.5.5v5.5c0 .3.2.5.5.5z"></path></g></svg></span></button></li>';
            t(".list").append(a)
        }),
    t(document).on("click", '[data-action="remove-nav-item"]', function (e) {
            e.preventDefault();
            var a = t(this);
            a.parent().remove()
        }),
    t(document).on("click", '[data-action="save-ad"]', function (e) {
            e.preventDefault();
            var a = t(this);
            if (!a.hasClass("is-active")) {
                a.addClass("is-active");
                var i = t(".form").serialize() + "&action=add_ad";
                t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    data: i,
                    success: function (t) {
                        s("创建成功"),
                        a.removeClass("is-active")
                    }
                })
            }
        })
}(jQuery),
jQuery(".focusBox").slide({
    mainCell: ".pic",
    effect: "fold",
    autoPlay: !0,
    delayTime: 600,
    trigger: "click"
});
var Layzr = function () {
    function t(e) {
        _classCallCheck(this, t),
        this._lastScroll = 0,
        this._ticking = !1,
        e = e || {},
        this._optionsContainer = document.querySelector(e.container) || window,
        this._optionsSelector = e.selector || "[data-layzr]",
        this._optionsAttr = e.attr || "data-lazyr",
        this._optionsAttrRetina = e.retinaAttr || "data-layzr-retina",
        this._optionsAttrBg = e.bgAttr || "data-layzr-bg",
        this._optionsAttrHidden = e.hiddenAttr || "data-layzr-hidden",
        this._optionsThreshold = e.threshold || 0,
        this._optionsCallback = e.callback || null,
        this._retina = window.devicePixelRatio > 1,
        this._srcAttr = this._retina ? this._optionsAttrRetina : this._optionsAttr,
        this._nodes = document.querySelectorAll(this._optionsSelector),
        this._create()
    }
    return _createClass(t, [{
        key: "_requestScroll",
        value: function () {
            this._optionsContainer === window ? this._lastScroll = window.scrollY || window.pageYOffset : this._lastScroll = this._optionsContainer.scrollTop + this._getOffset(this._optionsContainer),
            this._requestTick()
        }
    },
    {
        key: "_requestTick",
        value: function () {
            this._ticking || (requestAnimationFrame(this.update.bind(this)), this._ticking = !0)
        }
    },
    {
        key: "_getOffset",
        value: function (t) {
            var e = 0;
            do isNaN(t.offsetTop) || (e += t.offsetTop);
            while (t = t.offsetParent);
            return e
        }
    },
    {
        key: "_getContainerHeight",
        value: function () {
            return this._optionsContainer.innerHeight || this._optionsContainer.offsetHeight
        }
    },
    {
        key: "_create",
        value: function () {
            this._requestScroll(),
            this._optionsContainer.addEventListener("scroll", this._requestScroll.bind(this), !1),
            this._optionsContainer.addEventListener("resize", this._requestScroll.bind(this), !1)
        }
    },
    {
        key: "_destroy",
        value: function () {
            this._optionsContainer.removeEventListener("scroll", this._requestScroll.bind(this), !1),
            this._optionsContainer.removeEventListener("resize", this._requestScroll.bind(this), !1)
        }
    },
    {
        key: "_inViewport",
        value: function (t) {
            var e = this._lastScroll,
                a = e + this._getContainerHeight(),
                i = this._getOffset(t),
                o = i + this._getContainerHeight(),
                n = this._optionsThreshold / 100 * window.innerHeight;
            return o >= e - n && a + n >= i && !t.hasAttribute(this._optionsAttrHidden);
        }
    },
    {
        key: "_reveal",
        value: function (t) {
            var e = t.getAttribute(this._srcAttr) || t.getAttribute(this._optionsAttr);
            t.hasAttribute(this._optionsAttrBg) ? t.style.backgroundImage = "url(" + e + ")" : t.setAttribute("src", e),
            "function" == typeof this._optionsCallback && this._optionsCallback.call(t),
            t.removeAttribute(this._optionsAttr),
            t.removeAttribute(this._optionsAttrRetina),
            t.removeAttribute(this._optionsAttrBg),
            t.removeAttribute(this._optionsAttrHidden)
        }
    },
    {
        key: "updateSelector",
        value: function () {
            this._nodes = document.querySelectorAll(this._optionsSelector)
        }
    },
    {
        key: "update",
        value: function () {
            for (var t = this._nodes.length, e = 0; t > e; e++) {
                var a = this._nodes[e];
                a.hasAttribute(this._optionsAttr) && this._inViewport(a) && this._reveal(a)
            }
            this._ticking = !1
        }
    }]),
    t
}(),
    homeLazy = new Layzr({
        container: null,
        selector: ".y-post-image",
        threshold: 0
    }); +
function (t) {
        function e() {
            var e = t(window).scrollTop(),
                a = t(window).height();
            if (Math.abs(e - i) < 20) return 0;
            var o = 0;
            e - i > 0 ? o = 1 : e - i < 0 && (o = 2);
            t(window).scrollTop() + t(window).height();
            i > -1 && t(".post-article").each(function () {
                    var i = t(this).attr("posturl"),
                        n = t(this).find(".entry-header").find(".post-title").text(),
                        s = t(this).offset().top,
                        r = s + t(this).outerHeight();
                    if (1 == o) {
                            if (s > e && s < e + a / 3) {
                                if (window.location.href != i) {
                                    var l = {
                                        title: n,
                                        url: window.location.href
                                    };
                                    window.history.pushState(l, document.title, i),
                                    document.title = n
                                }
                                t(".post-article").removeClass("is-showed"),
                                t(this).addClass("is-showed")
                            }
                        } else if (2 == o && r < e + a && r > e + 2 * a / 3) {
                            if (window.location.href != i) {
                                var l = {
                                    title: n,
                                    url: window.location.href
                                };
                                window.history.pushState(l, document.title, i),
                                document.title = n
                            }
                            t(".post-article").removeClass("is-showed"),
                            t(this).addClass("is-showed")
                        }
                }),
            i = e
        }
        var a = t("body"),
            i = -1;
        window.invisiblezone = e;
        var o = !1;
        t(window).on("scroll", function () {
                if (t(".load-next-post").length) {
                    e();
                    var i = t(".load-next-post").offset().top;
                    t(this).scrollTop() + t(window).height() > i && 0 == o && (o = !0, a.addClass("is-loadingApp"), t(".load-next-post").html("加载中"), t.ajax({
                        url: t(".load-next-post").data("url") + "?next_post=",
                        type: "GET",
                        dataType: "html",
                        success: function (e) {
                            t(".load-next-post").remove(),
                            t(".ajaxWrapper").append(e),
                            o = !1,
                            a.removeClass("is-loadingApp")
                        }
                    }))
                }
            })
    }(jQuery),
+
function (t) {
        function e(t) {
            var e, a = new RegExp("(^| )" + t + "=([^;]*)(;|$)");
            return (e = document.cookie.match(a)) ? unescape(e[2]) : null
        }
        function a() {
            return !!(window.ActiveXObject || "ActiveXObject" in window)
        }
        function i(t) {
            return null != t.match(/\.(jpeg|jpg|gif|png)$/)
        }
        function o() {
            t(".top-banner").slideUp(800)
        }
        function n(t) {
            var e = t.url,
                a = t.image,
                i = '<div class="overlay overlay--dark">';
            i += '<div class="overlay-ad overlay-dialog--animate"><a class="close-btn-2" data-action="overlay-close" href="javascript:;"></a><a href="' + e + '" target="_blank"><img src="' + a + '"></</div>',
            i += "</div>",
            s.append(i)
        }
        var s = t("body");
        t('[data-action="uplike"]').length > 0 && t('[data-action="uplike"]').each(function (a, i) {
            var o = t(this),
                n = o.data("id");
            e("post_action_" + n) && o.addClass("is-active")
        }),
        window.hideTopBanner = o,
        e("overlayShow") || a() 
//        || t.ajax({
//            url: PURE.ajax_url,
//            type: "POST",
//            dataType: "json",
//            data: {
//                action: "isHasOverlay",
//                isHome: PURE.is_home
//            },
//            success: function (e) {
//                if (200 == e.status) {
//                    var a = e.d;
//                    if ("1" == a.target) {
//                        var i = '<div class="top-banner"><a class="overlayAdlink" data-id="' + a.id + '" href="' + a.link + '" target="_blank"><img src="' + a.image + '"></a></div>';
//                        t(".surface-container").before(i),
//                        t(".top-banner").slideDown(800),
//                        s.addClass("not-fixed"),
//                        setTimeout("hideTopBanner()", 1e4)
//                    } else {
//                        var i = '<div class="overlay overlay--dark">';
//                        i += '<div class="overlay-ad overlay-dialog--animate"><a class="close-btn-2" data-action="overlay-close" href="javascript:;"></a><a class="overlayAdlink" data-id="' + a.id + '" href="' + a.link + '" target="_blank"><img src="' + a.image + '"></a></div>',
//                        i += "</div>",
//                        s.append(i)
//                    }
//                }
//            }
//        })
        ,
        t(document).on("click", '[data-action="overlay-preview"]', function (e) {
            var a = t(".overlayImage--input").val();
            if (!i(a)) return createButterbar("图片地址参数错误", !0),
            void t(".overlayImage--input").focus();
            var o = "",
                s = {
                    url: o,
                    image: a
                };
            n(s)
        }),
        t(".overlayImage--input").bind("input propertychange", function () {
            var e = t(this),
                a = e.val();
            i(a) && t(".js-image").attr("src", a)
        }),
        t(document).on("change", '[action="show-activeAd"]', function (e) {
            var a = t(this);
            a.is(":checked") ? t(".overlay-list-item:not(.is-active)").addClass("u-hide") : t(".overlay-list-item:not(.is-active)").removeClass("u-hide")
        }),
        t(document).on("click", ".overlayAdlink", function (e) {
            var a = t(this),
                i = a.data("id");
            t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    dataType: "json",
                    data: {
                        action: "overlayClick",
                        id: i
                    },
                    success: function (t) {}
                })
        }),
        t(document).on("change", ".showEverywhere--check", function (e) {
            var a = t(this);
            a.is(":checked") ? (t(".form-row-cities,.form-row-provices").addClass("u-hide"), t(".form-row-cities,.form-row-provices").find(".demo--radio").removeAttr("checked")) : t(".form-row-cities,.form-row-provices").removeClass("u-hide")
        }),
        t(document).on("click", '[data-action="save-collection"]', function (e) {
            e.preventDefault();
            var a = t(this);
            if (!a.hasClass("is-active")) {
                a.addClass("is-active");
                var i = t(".form").serialize() + "&action=add_overlay";
                t.ajax({
                    url: PURE.ajax_url,
                    type: "POST",
                    data: i,
                    success: function (t) {
                        createButterbar("创建成功"),
                        a.removeClass("is-active")
                    }
                })
            }
        })
    }(jQuery),
+
function (t) {
        function e(e) {
            t.ajax({
                url: PURE.ajax_url,
                type: "GET",
                dataType: "json",
                data: {
                    action: "check_trade",
                    trade_id: e
                },
                success: function (e) {
                    200 == e.CODE ? e.RESULT.ispay && (t(".wpd-overlay-body").html(o), clearInterval(i)) : 500 == e.status && (clearInterval(i), alert(e.message))
                }
            })
        }
        function a() {
            clearInterval(i),
            t(".overlay").remove()
        }
        var i;
        t(document).on("click", ".button--pay", function (e) {
            var a = t(this),
                i = a.data("post-id"),
                o = t("#article-avatar-" + i + " .avatar").attr("src"),
                n = a.data("author"),
                s = "您的赞赏，是对我创作的最大鼓励。",
                r = '<div class="overlay overlay--dark"><div class="wpd-dialog"><button class="wpd-btn-close" data-action="overlay-close">×</button><div class="wpd-overlay-body"><header class="wpd-header"><img class="wpd-avatar" src="' + o + '"><h3 class="wpd-title">' + s + '</h3></header><div class="wpd-payway u-textAlignLeft"><h5 class="wpd-payway-title">选择支付金额</h5><label class="demo--label"><input class="demo--radio" type="radio" name="paycount" value="1" checked=true><span class="demo--radioInput"></span>1元</label><label class="demo--label"><input class="demo--radio" type="radio" name="paycount" value="2"><span class="demo--radioInput"></span>2元</label><label class="demo--label"><input class="demo--radio" type="radio" name="paycount" value="5"><span class="demo--radioInput"></span>5元</label></div><div class="wpd-payway u-textAlignLeft"><h5 class="wpd-payway-title">选择支付方式</h5><label class="demo--label"><input class="demo--radio" type="radio" name="payway" value="wechat" checked=true><span class="demo--radioInput"></span>微信</label><label class="demo--label"><input class="demo--radio" type="radio" name="payway" value="alipay"><span class="demo--radioInput"></span>支付宝</label></div><div class="wpd-inputs u-textAlignLeft"><div class="wpd-input-item message"><textarea id="reward_message" name="message" class="wpd-input-textarea" placeholder="给Ta留言"></textarea></div></div><input name="postid" type="hidden" value="' + i + '"><input name="authorid" type="hidden" value="' + n + '"><div class="overlay-actions buttonSet"><div class="buttonSet buttonSet--vertical"><button class="wpd-btn-confirm" data-action="pay"><span class="button-label js-buttonLabel">立即支付</span></button><div class="wpd-overlay-notice">注：打赏的收益归作者，非平台</div></div></div></div></div></div>';
            t("body").append(r)
        });
        var o = '<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="80" height="80" viewBox="0 0 64 64"><g class="transform-group"><g transform="scale(0.0625, 0.0625)"><path d="M925.030941 337.564156c-22.537296-53.283554-54.797024-101.132328-95.882767-142.218072-41.084721-41.085744-88.934518-73.345472-142.218072-95.881744-55.17667-23.337521-113.7763-35.171034-174.170808-35.171034S393.764132 76.126818 338.588485 99.464339c-53.283554 22.536272-101.132328 54.796-142.218072 95.881744s-73.345472 88.934518-95.881744 142.218072c-23.337521 55.175647-35.171034 113.775276-35.171034 174.170808 0 60.395532 11.83249 118.995161 35.171034 174.170808 22.536272 53.283554 54.796 101.132328 95.881744 142.218072 41.085744 41.084721 88.934518 73.344448 142.218072 95.881744 55.175647 23.337521 113.775276 35.170011 174.170808 35.170011s118.994138-11.83249 174.170808-35.170011c53.28253-22.537296 101.132328-54.797024 142.218072-95.881744 41.085744-41.085744 73.345472-88.934518 95.882767-142.218072 23.337521-55.175647 35.170011-113.775276 35.170011-174.170808C960.200952 451.339432 948.367439 392.739802 925.030941 337.564156zM512.759293 918.243351c-224.149083 0-406.508387-182.359304-406.508387-406.508387s182.359304-406.508387 406.508387-406.508387c224.150106 0 406.509411 182.359304 406.509411 406.508387S736.909399 918.243351 512.759293 918.243351zM621.354594 281.552467l-72.883961 134.291542c-19.436678 36.393885-31.323403 60.584843-35.666314 72.573899l-1.24127 0c-12.822027-29.153994-49.002041-98.107435-108.550275-206.865441l-68.541049 0 127.46916 218.96092L357.423459 500.513388l0 48.381917 122.507148 0 0 66.680678L357.423459 615.575983l0 49.003064 122.507148 0 0 97.074919 60.787458 0 0-97.074919 118.166283 0 0-49.003064L540.717042 615.575983l0-66.680678 118.166283 0 0-48.381917-101.416807 0 128.708384-218.96092L621.354594 281.552467z" fill="#272636"></path></g></g></svg><p>报告土豪，您已打赏成功。</p><p class="wpd-overlay-notice">注：打赏数据显示有延迟</p>';
        t(document).on("click", '[data-action="overlay-close"]', function (t) {
            a()
        }),
        window.check_trade = e,
        t(document).on("click", '[data-action="pay"]', function (e) {
            var n = t('input[name="paycount"]:checked').val(),
                s = t("#reward_message").val(),
                r = t('input[name="payway"]:checked').val(),
                l = t('input[name="authorid"]').val(),
                c = t('input[name="postid"]').val();
            if (s.length > 60) return alert("留言内容必须小于30字。");
            if (!t.isNumeric(n) || parseFloat(n) < 1) return alert("金额不能小于1");
            if (!t(this).hasClass("is-active")) if (t(this).addClass("is-active").html("loading"), "alipay" == r) {
                    var d = "http://api.woshipm.com/reward/aliPcPay.html?authorId=" + l + "&articleId=" + c + "&totalFee=" + n + "&payType=1&platType=1&source=1&message=" + s + "&COMMON_ACCESS_TOKEN=" + PURE.token + "&COMMON_ACCESS_TOKEN_SECRET=" + PURE.secret;
                    window.open(d),
                    t(".wpd-overlay-body").html(o),
                    clearInterval(i)
                } else t.ajax({
                    url: PURE.ajax_url,
                    type: "GET",
                    dataType: "json",
                    data: {
                        action: "donation_qrcode",
                        count: n,
                        author: l,
                        postid: c,
                        type: r,
                        message: s
                    },
                    success: function (e) {
                        if (200 != e.CODE) alert("输入内容有误，重新输入。"),
                        a();
                        else {
                            var o = "<h4>微信扫码支付</h4><p>打赏金额：<span>" + n + ' 元</span></p><img width=300 height=300 src="http://qr.liantu.com/api.php?text=' + e.RESULT.code_url + '"></div>';
                            t(".wpd-overlay-body").html(o),
                            window.doooo_trade_id = e.RESULT.orderNo,
                            i = setInterval("check_trade(doooo_trade_id)", 1e3)
                        }
                    }
                })
        })
    }(jQuery);